package thinking_net;

import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.UnknownHostException;

public class NetAddress {

	public static void main(String[] args) throws UnknownHostException {
		InetSocketAddress inet=new InetSocketAddress("localhost", 8888);
		System.out.println(inet.getAddress());
		InetAddress address=InetAddress.getByName("localhost");
		System.out.println(address.getHostAddress());
	}
}
